package com.lei.demo.abstrct.app;

import com.lei.demo.abstrct.AbstractFactory;
import com.lei.demo.abstrct.impl.AmdFactory;
import com.lei.demo.abstrct.impl.IntelFactory;

public class Client {

	public static void main(String[] args) {
		//创建装机工程师对象
		ComputerEngineer cf = new ComputerEngineer();
		//客户选择并创建需要使用的产品对象
		AbstractFactory af1 = new IntelFactory();
		AbstractFactory af2 = new AmdFactory();
		//告诉装机工程师自己选择的产品，让装机工程师组装电脑
		cf.makeComputer(af1);
		cf.makeComputer(af2);
	}

}
